object fCadVenda: TfCadVenda
  Left = 418
  Top = 142
  BorderStyle = bsDialog
  Caption = 'Venda'
  ClientHeight = 490
  ClientWidth = 616
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'MS Sans Serif'
  Font.Style = []
  KeyPreview = True
  OldCreateOrder = False
  Position = poMainFormCenter
  OnClose = FormClose
  OnKeyPress = FormKeyPress
  OnShow = FormShow
  PixelsPerInch = 96
  TextHeight = 13
  object PageControl1: TPageControl
    Left = -5
    Top = -23
    Width = 625
    Height = 514
    ActivePage = TabSheet1
    TabOrder = 0
    object TabSheet1: TTabSheet
      Caption = 'TabSheet1'
      object Label1: TLabel
        Left = 8
        Top = 48
        Width = 26
        Height = 13
        Caption = 'Data '
      end
      object Label2: TLabel
        Left = 8
        Top = 8
        Width = 38
        Height = 13
        Caption = 'Nota N'#186
      end
      object SpeedButton1: TSpeedButton
        Left = 469
        Top = 88
        Width = 143
        Height = 41
        Caption = 'Lan'#231'ar Produtos'
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clWindowText
        Font.Height = -11
        Font.Name = 'MS Sans Serif'
        Font.Style = [fsBold]
        ParentFont = False
        OnClick = SpeedButton1Click
      end
      object Label5: TLabel
        Left = 337
        Top = 349
        Width = 112
        Height = 15
        Caption = 'Total dos Produtos'
        Font.Charset = ANSI_CHARSET
        Font.Color = clWindowText
        Font.Height = -13
        Font.Name = 'Cambria'
        Font.Style = [fsBold]
        ParentFont = False
      end
      object Label6: TLabel
        Left = 360
        Top = 381
        Width = 88
        Height = 15
        Caption = 'Total da Venda'
        Font.Charset = ANSI_CHARSET
        Font.Color = clWindowText
        Font.Height = -13
        Font.Name = 'Cambria'
        Font.Style = [fsBold]
        ParentFont = False
      end
      object Label7: TLabel
        Left = 97
        Top = 332
        Width = 63
        Height = 13
        Caption = 'Desconto (%)'
      end
      object Label8: TLabel
        Left = 97
        Top = 372
        Width = 69
        Height = 13
        Caption = 'Desconto (R$)'
      end
      object Label9: TLabel
        Left = 9
        Top = 332
        Width = 60
        Height = 13
        Caption = 'Adicional (%)'
      end
      object Label10: TLabel
        Left = 9
        Top = 372
        Width = 66
        Height = 13
        Caption = 'Adicional (R$)'
      end
      object lbSituacao: TLabel
        Left = 17
        Top = 94
        Width = 118
        Height = 22
        Caption = 'N'#227'o Definido'
        Font.Charset = ANSI_CHARSET
        Font.Color = clMaroon
        Font.Height = -19
        Font.Name = 'Arial'
        Font.Style = [fsBold]
        ParentFont = False
      end
      object SpeedButton2: TSpeedButton
        Left = 458
        Top = 433
        Width = 155
        Height = 44
        Caption = 'Finalizar'
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clWindowText
        Font.Height = -11
        Font.Name = 'MS Sans Serif'
        Font.Style = [fsBold]
        ParentFont = False
        OnClick = SpeedButton2Click
      end
      object SpeedButton4: TSpeedButton
        Left = 6
        Top = 424
        Width = 136
        Height = 25
        Caption = 'Cadastrar Vendedor'
        Flat = True
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clWindowText
        Font.Height = -11
        Font.Name = 'MS Sans Serif'
        Font.Style = [fsBold]
        ParentFont = False
        OnClick = SpeedButton4Click
      end
      object Label3: TLabel
        Left = 100
        Top = 8
        Width = 32
        Height = 13
        Caption = 'Cliente'
      end
      object SpeedButton5: TSpeedButton
        Left = 588
        Top = 21
        Width = 23
        Height = 25
        Flat = True
        Glyph.Data = {
          2E060000424D2E06000000000000360400002800000015000000150000000100
          080000000000F8010000120B0000120B0000000100005D00000000000000DFDF
          E800E9E90C008D8D8D0092924E00FFFF720070702A00BEBDBD00CECE14003737
          270062626900F4F41E001D1D1D00A8A81B00F6F6FB00FFFFE20099999900FFFF
          B9005A5A5200D9D929009C9C6200FFFFEE007C7B6900C5C5D40042423900FFFF
          0000FFFFAA00A5A59E00A9A93800D7D7130095959200FFFF3B00807F39000908
          0800F2F2F200D8D8D800FFFF990077775D00E1E14700949480004F4F4F00B4B4
          A400CCCCCC00BBBB22008B8A6900757575002A2A37009D9D4300F9F90900FFFF
          FF003D3B3B00FFFF8F009090AB00FFFF1C00F8F8F8008585490085859800CFCF
          D9000E0E0E00E4E4E400E0E0E000ABAB1E0033333300FFFF830064647E002929
          2700FFFFC6007A7A7A00D2D22200FFFF2D00C2C2C200A5A53F00AFAFAF00ECEC
          06009B9BA600DDDD2D00C8C81D00FCFC060000000500CECEDE0095955400FFFF
          2300A4A3A300F0F0F500E2E2EB0076763300D1D1150024232800A6A52300FFFF
          BD005D5C5C00D6D6E000F4F41000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000313131313131
          3131313131313131313131313131310000003131313131313131313131313131
          3131313131313100000031313131313131313131313131313131313123033100
          00003131313131313131313131313131313131073E2152000000313131313131
          3131313131313131313643210032520000003131313131313131313131313131
          2A3200002D223100000031313131310E530E3131313131103A000C4831313100
          00003131314627502F141B54313B5A0000283C31313131000000313103504B19
          194D08043841002103313131313131000000314A4759511919191930064E3E2A
          31313131313131000000012033051919191919195C1222313131313131313100
          0000402B4245191919191919192F0E313131313131313100000057130F351919
          19191919193D3931313131313131310000002E44153F19191919191919585B31
          31313131313131000000340D243135191919191919370E313131313131313100
          000036250B1A1F19191919194C4A31313131313131313100000031395549111F
          1919195616363131313131313131310000003131172C2926021D1C1E53313131
          313131313131310000003131310E1B18090A3931313131313131313131313100
          0000313131313131313131313131313131313131313131000000313131313131
          313131313131313131313131313131000000}
        OnClick = SpeedButton5Click
      end
      object Label4: TLabel
        Left = 122
        Top = 48
        Width = 49
        Height = 13
        Caption = 'Vendedor '
      end
      object SpeedButton3: TSpeedButton
        Left = 588
        Top = 61
        Width = 23
        Height = 25
        Flat = True
        Glyph.Data = {
          2E060000424D2E06000000000000360400002800000015000000150000000100
          080000000000F8010000120B0000120B0000000100005D00000000000000DFDF
          E800E9E90C008D8D8D0092924E00FFFF720070702A00BEBDBD00CECE14003737
          270062626900F4F41E001D1D1D00A8A81B00F6F6FB00FFFFE20099999900FFFF
          B9005A5A5200D9D929009C9C6200FFFFEE007C7B6900C5C5D40042423900FFFF
          0000FFFFAA00A5A59E00A9A93800D7D7130095959200FFFF3B00807F39000908
          0800F2F2F200D8D8D800FFFF990077775D00E1E14700949480004F4F4F00B4B4
          A400CCCCCC00BBBB22008B8A6900757575002A2A37009D9D4300F9F90900FFFF
          FF003D3B3B00FFFF8F009090AB00FFFF1C00F8F8F8008585490085859800CFCF
          D9000E0E0E00E4E4E400E0E0E000ABAB1E0033333300FFFF830064647E002929
          2700FFFFC6007A7A7A00D2D22200FFFF2D00C2C2C200A5A53F00AFAFAF00ECEC
          06009B9BA600DDDD2D00C8C81D00FCFC060000000500CECEDE0095955400FFFF
          2300A4A3A300F0F0F500E2E2EB0076763300D1D1150024232800A6A52300FFFF
          BD005D5C5C00D6D6E000F4F41000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000313131313131
          3131313131313131313131313131310000003131313131313131313131313131
          3131313131313100000031313131313131313131313131313131313123033100
          00003131313131313131313131313131313131073E2152000000313131313131
          3131313131313131313643210032520000003131313131313131313131313131
          2A3200002D223100000031313131310E530E3131313131103A000C4831313100
          00003131314627502F141B54313B5A0000283C31313131000000313103504B19
          194D08043841002103313131313131000000314A4759511919191930064E3E2A
          31313131313131000000012033051919191919195C1222313131313131313100
          0000402B4245191919191919192F0E313131313131313100000057130F351919
          19191919193D3931313131313131310000002E44153F19191919191919585B31
          31313131313131000000340D243135191919191919370E313131313131313100
          000036250B1A1F19191919194C4A31313131313131313100000031395549111F
          1919195616363131313131313131310000003131172C2926021D1C1E53313131
          313131313131310000003131310E1B18090A3931313131313131313131313100
          0000313131313131313131313131313131313131313131000000313131313131
          313131313131313131313131313131000000}
        OnClick = SpeedButton3Click
      end
      object SpeedButton6: TSpeedButton
        Left = 6
        Top = 449
        Width = 136
        Height = 25
        Caption = 'Cadstrar Cliente'
        Flat = True
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clWindowText
        Font.Height = -11
        Font.Name = 'MS Sans Serif'
        Font.Style = [fsBold]
        ParentFont = False
        OnClick = SpeedButton6Click
      end
      object lbTotalProduto: TDBText
        Left = 480
        Top = 342
        Width = 115
        Height = 20
        Alignment = taRightJustify
        DataField = 'SUB_TOTAL'
        DataSource = dsVenda
        Font.Charset = ANSI_CHARSET
        Font.Color = clWindowText
        Font.Height = -19
        Font.Name = 'Cambria'
        Font.Style = [fsBold]
        ParentFont = False
      end
      object lbTotalNota: TDBText
        Left = 476
        Top = 369
        Width = 119
        Height = 32
        Alignment = taRightJustify
        DataField = 'VALOR_TOTAL'
        DataSource = dsVenda
        Font.Charset = ANSI_CHARSET
        Font.Color = clBlue
        Font.Height = -27
        Font.Name = 'Cambria'
        Font.Style = [fsBold]
        ParentFont = False
      end
      object dbNumNota: TDBEdit
        Left = 8
        Top = 24
        Width = 83
        Height = 21
        DataField = 'NUM_NOTA'
        DataSource = dsVenda
        Enabled = False
        TabOrder = 0
      end
      object DBGrid2: TDBGrid
        Left = 8
        Top = 131
        Width = 603
        Height = 195
        DataSource = dsItens
        Options = [dgTitles, dgIndicator, dgColLines, dgRowLines, dgTabs, dgRowSelect, dgConfirmDelete, dgCancelOnExit]
        TabOrder = 2
        TitleFont.Charset = DEFAULT_CHARSET
        TitleFont.Color = clWindowText
        TitleFont.Height = -11
        TitleFont.Name = 'MS Sans Serif'
        TitleFont.Style = []
        OnDrawColumnCell = DBGrid2DrawColumnCell
        OnDblClick = DBGrid2DblClick
        OnKeyDown = DBGrid2KeyDown
        Columns = <
          item
            Expanded = False
            FieldName = 'PRODUTO_FK'
            Title.Caption = 'C'#243'digo'
            Width = 52
            Visible = True
          end
          item
            Expanded = False
            FieldName = 'DESCRICAO'
            Title.Caption = 'Produto'
            Width = 263
            Visible = True
          end
          item
            Alignment = taCenter
            Expanded = False
            FieldName = 'QUANTIDADE'
            Title.Alignment = taCenter
            Title.Caption = 'Qtde'
            Width = 54
            Visible = True
          end
          item
            Expanded = False
            FieldName = 'VALOR_UNIT'
            Title.Alignment = taRightJustify
            Title.Caption = 'Valor Unit'#225'rio'
            Width = 99
            Visible = True
          end
          item
            Expanded = False
            FieldName = 'VALOR_TOTAL'
            Title.Alignment = taRightJustify
            Title.Caption = 'Valor Total'
            Width = 92
            Visible = True
          end>
      end
      object dbData: TDBDateEdit
        Left = 8
        Top = 64
        Width = 102
        Height = 21
        DataField = 'DATA'
        DataSource = dsVenda
        NumGlyphs = 2
        TabOrder = 1
        OnExit = dbDataExit
      end
      object dbAdicPerc: TRxCalcEdit
        Left = 9
        Top = 348
        Width = 81
        Height = 21
        AutoSize = False
        DisplayFormat = '##,###,#0.00'
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clBlue
        Font.Height = -11
        Font.Name = 'MS Sans Serif'
        Font.Style = [fsBold]
        NumGlyphs = 2
        ParentFont = False
        TabOrder = 3
        OnExit = dbAdicPercExit
      end
      object dbAdicValor: TRxCalcEdit
        Left = 9
        Top = 388
        Width = 81
        Height = 21
        AutoSize = False
        DisplayFormat = '##,###,#0.00'
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clBlue
        Font.Height = -11
        Font.Name = 'MS Sans Serif'
        Font.Style = [fsBold]
        NumGlyphs = 2
        ParentFont = False
        TabOrder = 4
        OnExit = dbAdicValorExit
      end
      object dbDescPerc: TRxCalcEdit
        Left = 97
        Top = 348
        Width = 81
        Height = 21
        AutoSize = False
        DisplayFormat = '##,###,#0.00'
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clMaroon
        Font.Height = -11
        Font.Name = 'MS Sans Serif'
        Font.Style = [fsBold]
        NumGlyphs = 2
        ParentFont = False
        TabOrder = 5
        OnExit = dbDescPercExit
      end
      object dbDescValor: TRxCalcEdit
        Left = 97
        Top = 388
        Width = 81
        Height = 21
        AutoSize = False
        DisplayFormat = '##,###,#0.00'
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clMaroon
        Font.Height = -11
        Font.Name = 'MS Sans Serif'
        Font.Style = [fsBold]
        NumGlyphs = 2
        ParentFont = False
        TabOrder = 6
        OnExit = dbDescValorExit
      end
      object dbCliente: TDBEdit
        Left = 101
        Top = 24
        Width = 59
        Height = 21
        DataField = 'CLIENTE_FK'
        DataSource = dsVenda
        TabOrder = 7
        OnExit = dbClienteExit
        OnKeyDown = dbClienteKeyDown
      end
      object Edit1: TEdit
        Left = 161
        Top = 24
        Width = 426
        Height = 21
        Enabled = False
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clWindowText
        Font.Height = -11
        Font.Name = 'MS Sans Serif'
        Font.Style = [fsBold]
        ParentFont = False
        TabOrder = 8
      end
      object GroupBox1: TGroupBox
        Left = -8
        Top = 411
        Width = 632
        Height = 7
        TabOrder = 9
      end
      object dbVendedor: TDBEdit
        Left = 123
        Top = 64
        Width = 59
        Height = 21
        DataField = 'VENDEDOR_FK'
        DataSource = dsVenda
        TabOrder = 10
        OnExit = dbVendedorExit
        OnKeyDown = dbVendedorKeyDown
      end
      object Edit2: TEdit
        Left = 183
        Top = 64
        Width = 405
        Height = 21
        Enabled = False
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clWindowText
        Font.Height = -11
        Font.Name = 'MS Sans Serif'
        Font.Style = [fsBold]
        ParentFont = False
        TabOrder = 11
      end
    end
    object TabSheet2: TTabSheet
      Caption = 'TabSheet2'
      ImageIndex = 1
      object Bevel1: TBevel
        Left = 8
        Top = 6
        Width = 600
        Height = 57
      end
      object Label12: TLabel
        Left = 29
        Top = 40
        Width = 32
        Height = 13
        Caption = 'Cliente'
      end
      object Label13: TLabel
        Left = 349
        Top = 40
        Width = 46
        Height = 13
        Caption = 'Vendedor'
      end
      object Label14: TLabel
        Left = 357
        Top = 16
        Width = 38
        Height = 13
        Caption = 'Nota N'#186
      end
      object Label15: TLabel
        Left = 37
        Top = 16
        Width = 23
        Height = 13
        Caption = 'Data'
      end
      object Label16: TLabel
        Left = 410
        Top = 12
        Width = 60
        Height = 19
        Caption = 'Label16'
        Font.Charset = ANSI_CHARSET
        Font.Color = clBlue
        Font.Height = -16
        Font.Name = 'Arial'
        Font.Style = [fsBold]
        ParentFont = False
      end
      object Label17: TLabel
        Left = 80
        Top = 16
        Width = 28
        Height = 13
        Caption = 'Data'
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clWindowText
        Font.Height = -11
        Font.Name = 'MS Sans Serif'
        Font.Style = [fsBold]
        ParentFont = False
      end
      object Label18: TLabel
        Left = 80
        Top = 40
        Width = 40
        Height = 13
        Caption = 'Cliente'
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clWindowText
        Font.Height = -11
        Font.Name = 'MS Sans Serif'
        Font.Style = [fsBold]
        ParentFont = False
      end
      object Label19: TLabel
        Left = 411
        Top = 40
        Width = 55
        Height = 13
        Caption = 'Vendedor'
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clWindowText
        Font.Height = -11
        Font.Name = 'MS Sans Serif'
        Font.Style = [fsBold]
        ParentFont = False
      end
      object Label20: TLabel
        Left = 121
        Top = 83
        Width = 38
        Height = 22
        Caption = '0,00'
        Font.Charset = ANSI_CHARSET
        Font.Color = clBlue
        Font.Height = -19
        Font.Name = 'Arial'
        Font.Style = [fsBold]
        ParentFont = False
      end
      object Label21: TLabel
        Left = 14
        Top = 86
        Width = 80
        Height = 19
        Caption = 'Valor Total'
        Font.Charset = ANSI_CHARSET
        Font.Color = clWindowText
        Font.Height = -16
        Font.Name = 'Arial'
        Font.Style = [fsBold]
        ParentFont = False
      end
      object Label11: TLabel
        Left = 15
        Top = 123
        Width = 117
        Height = 13
        Caption = 'Condicao de Pagamento'
      end
      object SpeedButton7: TSpeedButton
        Left = 577
        Top = 136
        Width = 23
        Height = 25
        Flat = True
        Glyph.Data = {
          2E060000424D2E06000000000000360400002800000015000000150000000100
          080000000000F8010000120B0000120B0000000100005D00000000000000DFDF
          E800E9E90C008D8D8D0092924E00FFFF720070702A00BEBDBD00CECE14003737
          270062626900F4F41E001D1D1D00A8A81B00F6F6FB00FFFFE20099999900FFFF
          B9005A5A5200D9D929009C9C6200FFFFEE007C7B6900C5C5D40042423900FFFF
          0000FFFFAA00A5A59E00A9A93800D7D7130095959200FFFF3B00807F39000908
          0800F2F2F200D8D8D800FFFF990077775D00E1E14700949480004F4F4F00B4B4
          A400CCCCCC00BBBB22008B8A6900757575002A2A37009D9D4300F9F90900FFFF
          FF003D3B3B00FFFF8F009090AB00FFFF1C00F8F8F8008585490085859800CFCF
          D9000E0E0E00E4E4E400E0E0E000ABAB1E0033333300FFFF830064647E002929
          2700FFFFC6007A7A7A00D2D22200FFFF2D00C2C2C200A5A53F00AFAFAF00ECEC
          06009B9BA600DDDD2D00C8C81D00FCFC060000000500CECEDE0095955400FFFF
          2300A4A3A300F0F0F500E2E2EB0076763300D1D1150024232800A6A52300FFFF
          BD005D5C5C00D6D6E000F4F41000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000000000000000
          0000000000000000000000000000000000000000000000000000313131313131
          3131313131313131313131313131310000003131313131313131313131313131
          3131313131313100000031313131313131313131313131313131313123033100
          00003131313131313131313131313131313131073E2152000000313131313131
          3131313131313131313643210032520000003131313131313131313131313131
          2A3200002D223100000031313131310E530E3131313131103A000C4831313100
          00003131314627502F141B54313B5A0000283C31313131000000313103504B19
          194D08043841002103313131313131000000314A4759511919191930064E3E2A
          31313131313131000000012033051919191919195C1222313131313131313100
          0000402B4245191919191919192F0E313131313131313100000057130F351919
          19191919193D3931313131313131310000002E44153F19191919191919585B31
          31313131313131000000340D243135191919191919370E313131313131313100
          000036250B1A1F19191919194C4A31313131313131313100000031395549111F
          1919195616363131313131313131310000003131172C2926021D1C1E53313131
          313131313131310000003131310E1B18090A3931313131313131313131313100
          0000313131313131313131313131313131313131313131000000313131313131
          313131313131313131313131313131000000}
        OnClick = SpeedButton7Click
      end
      object SpeedButton8: TSpeedButton
        Left = 12
        Top = 447
        Width = 136
        Height = 25
        Caption = 'Cadastrar Cond. Pgto'
        Flat = True
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clWindowText
        Font.Height = -11
        Font.Name = 'MS Sans Serif'
        Font.Style = [fsBold]
        ParentFont = False
        OnClick = SpeedButton8Click
      end
      object grid: TStringGrid
        Left = 15
        Top = 162
        Width = 584
        Height = 211
        ColCount = 4
        DefaultRowHeight = 19
        FixedCols = 0
        RowCount = 2
        Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goEditing, goRowSelect]
        TabOrder = 0
        ColWidths = (
          52
          89
          139
          87)
      end
      object BitBtn1: TBitBtn
        Left = 16
        Top = 396
        Width = 142
        Height = 33
        Caption = 'Voltar'
        TabOrder = 1
        OnClick = BitBtn1Click
      end
      object btnFaturar: TBitBtn
        Left = 459
        Top = 396
        Width = 142
        Height = 33
        Caption = 'Faturar'
        TabOrder = 2
        Visible = False
        OnClick = btnFaturarClick
      end
      object dbCondicao: TDBEdit
        Left = 15
        Top = 139
        Width = 49
        Height = 21
        DataField = 'CONDICAO_PGTO_FK'
        DataSource = dsVenda
        TabOrder = 3
        OnExit = dbCondicaoExit
        OnKeyDown = dbCondicaoKeyDown
      end
      object Edit3: TEdit
        Left = 66
        Top = 139
        Width = 507
        Height = 21
        Enabled = False
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clWindowText
        Font.Height = -11
        Font.Name = 'MS Sans Serif'
        Font.Style = [fsBold]
        ParentFont = False
        TabOrder = 4
      end
      object GroupBox2: TGroupBox
        Left = -19
        Top = 386
        Width = 644
        Height = 7
        TabOrder = 5
      end
    end
  end
  object dsCliente: TDataSource
    Left = 224
    Top = 248
  end
  object dsVenda: TDataSource
    DataSet = dm.qryVenda
    Left = 296
    Top = 256
  end
  object dsItens: TDataSource
    DataSet = qryItens
    Left = 160
    Top = 248
  end
  object qryItens: TIBOQuery
    Params = <
      item
        DataType = ftInteger
        Name = 'cod_venda'
        ParamType = ptInput
      end>
    DatabaseName = 'C:\Delphi7\Integrado\Dados\BANCO.GDB'
    IB_Connection = dm.base
    RecordCountAccurate = True
    SQL.Strings = (
      'select venda_itens.*,PRODUTO.descricao FROM venda_itens'
      'INNER JOIN produto ON (VENDA_ITENS.produto_fk = PRODUTO.codigo)'
      'WHERE venda_itens.venda_fk = :cod_venda'
      'order by venda_itens.codigo')
    FieldOptions = []
    Left = 176
    Top = 216
    object qryItensVALOR_UNIT: TBCDField
      FieldName = 'VALOR_UNIT'
      DisplayFormat = '##,###,#0.00'
      Size = 8
    end
    object qryItensVALOR_TOTAL: TBCDField
      FieldName = 'VALOR_TOTAL'
      DisplayFormat = '##,###,#0.00'
      Size = 8
    end
    object qryItensDESCRICAO: TStringField
      FieldName = 'DESCRICAO'
      Size = 100
    end
    object qryItensQUANTIDADE: TBCDField
      FieldName = 'QUANTIDADE'
      DisplayFormat = '##,###,#0.00'
      Size = 2
    end
    object qryItensCODIGO: TIntegerField
      FieldName = 'CODIGO'
      Required = True
    end
    object qryItensPRODUTO_FK: TIntegerField
      FieldName = 'PRODUTO_FK'
    end
    object qryItensVENDA_FK: TIntegerField
      FieldName = 'VENDA_FK'
    end
  end
  object atualizaTotal: TIBOQuery
    Params = <
      item
        DataType = ftUnknown
        Name = 'cod_venda'
        ParamType = ptUnknown
      end>
    DatabaseName = 'C:\Delphi7\Integrado\Dados\BANCO.GDB'
    IB_Connection = dm.base
    RecordCountAccurate = True
    SQL.Strings = (
      
        'select sum(venda_itens.valor_total) as total_prod FROM venda_ite' +
        'ns'
      'WHERE venda_itens.venda_fk = :cod_venda')
    FieldOptions = []
    Left = 88
    Top = 208
    object atualizaTotalTOTAL_PROD: TBCDField
      FieldName = 'TOTAL_PROD'
      ReadOnly = True
      Size = 8
    end
  end
  object atualizaTotalVenda: TIBOQuery
    Params = <>
    DatabaseName = 'C:\Delphi7\Integrado\Dados\BANCO.GDB'
    IB_Connection = dm.base
    RecordCountAccurate = True
    FieldOptions = []
    Left = 88
    Top = 248
  end
  object deletaItem: TIBOQuery
    Params = <
      item
        DataType = ftUnknown
        Name = 'COD_ITEM'
        ParamType = ptUnknown
      end>
    DatabaseName = 'C:\Delphi7\Integrado\Dados\BANCO.GDB'
    IB_Connection = dm.base
    RecordCountAccurate = True
    SQL.Strings = (
      'delete from venda_itens'
      'where venda_itens.codigo = :COD_ITEM')
    FieldOptions = []
    Left = 176
    Top = 184
    object IntegerField1: TIntegerField
      FieldName = 'COD_ITEM'
      Required = True
    end
    object IntegerField2: TIntegerField
      FieldName = 'PRODUTO'
    end
    object BCDField1: TBCDField
      FieldName = 'QUANTIDADE'
      DisplayFormat = '##,###,#0.00'
      Size = 8
    end
    object BCDField2: TBCDField
      FieldName = 'VALOR_UNIT'
      DisplayFormat = '##,###,#0.00'
      Size = 8
    end
    object BCDField3: TBCDField
      FieldName = 'VALOR_TOTAL'
      DisplayFormat = '##,###,#0.00'
      Size = 8
    end
    object IntegerField3: TIntegerField
      FieldName = 'COD_VENDA'
    end
    object StringField1: TStringField
      FieldName = 'DESCRICAO'
      Size = 100
    end
  end
  object dsCondPgto: TDataSource
    DataSet = dm.qryCondPgto
    Left = 208
    Top = 288
  end
  object dsVendedor: TDataSource
    DataSet = dm.qryVendedor
    Left = 240
    Top = 208
  end
  object resumo: TIBOQuery
    Params = <
      item
        DataType = ftInteger
        Name = 'VENDA'
        ParamType = ptInput
      end>
    DatabaseName = 'C:\Delphi7\Integrado\Dados\BANCO.GDB'
    IB_Connection = dm.base
    RecordCountAccurate = True
    SQL.Strings = (
      'select cli.nome as cliente,ven.nome as vendedor from venda'
      'inner join pessoa cli on cli.codigo = venda.cliente_fk'
      'inner join pessoa ven on ven.codigo = venda.vendedor_fk'
      'where venda.codigo = :VENDA')
    FieldOptions = []
    Left = 392
    Top = 192
    object resumoCLIENTE: TStringField
      FieldName = 'CLIENTE'
      Size = 100
    end
    object resumoVENDEDOR: TStringField
      FieldName = 'VENDEDOR'
      Size = 100
    end
  end
  object GeraCodigoFinanceiro: TIBOQuery
    Params = <>
    DatabaseName = 'C:\Delphi7\Integrado\Dados\BANCO.GDB'
    IB_Connection = dm.base
    RecordCountAccurate = True
    SQL.Strings = (
      'select GEN_ID(GEN_FINANCEIRO_ID,1) PK FROM RDB$DATABASE')
    FieldOptions = []
    Left = 288
    Top = 224
    object GeraCodigoFinanceiroPK: TLargeintField
      FieldName = 'PK'
      ReadOnly = True
      Required = True
    end
  end
  object geraCodigo: TIBOQuery
    Params = <>
    DatabaseName = 'C:\Delphi7\Integrado\Dados\BANCO.GDB'
    IB_Connection = dm.base
    RecordCountAccurate = True
    SQL.Strings = (
      'select GEN_ID(GEN_VENDA_ID,1) PK FROM RDB$DATABASE')
    FieldOptions = []
    Left = 296
    Top = 176
    object geraCodigoPK: TLargeintField
      FieldName = 'PK'
      ReadOnly = True
      Required = True
    end
  end
end
